<template>
  <div>
    <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
    <el-table-column type="index" width="55" align="center"  label="序号"/>
    <el-table-column label="检测报告类型" align="center" prop="checkType"/>
    <el-table-column label="预警类型" align="center" prop="warningType" />
    <el-table-column label="到期时间" align="center" prop="expirationDate" />
    
    <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
      <template slot-scope="scope">
        <el-button
          size="mini"
          type="text"
          @click="handleInfo(scope.row)"
         
        >处置</el-button>
        <!-- <el-button
          size="mini"
          type="text"
          @click="handleInfo(scope.row)"
          v-if="scope.row.E == 1"
        >上传放射证</el-button> -->
      </template>
    </el-table-column>
  </el-table>

  <el-pagination
    v-show="total>0"
    :total="total"
    :current-page.sync="queryParams.pageNum"
    :page-size="queryParams.pageSize"
    @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
  >
  </el-pagination>
  </div>

</template>

<script>
import {dev} from '@/api/radiation/todu.js'
export default {
  name: 'xzchTable',
  data() {
    return {
      // 遮罩层
      loading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 一企一档表格数据
      infoList: [
        {
          A:"放射证待办提醒",
          B:"公司有4个放射人员未持有放射证",
          C: "待处置",
          D:"2024-08-12 12:00:00",
          E:"0"
        },
        {
          A:"监测预警",
          B:"X射线监测预警",
          C: "待处置",
          D:"2024-08-12 12:00:00",
          E:"1"
        },
        {
          A:"放射人员培训考核提醒",
          B:"公司有4个放射人员超时未培训",
          C: "待处置",
          D:"2024-08-12 12:00:00",
          E:"1"
        },
        {
          A:"放射人员健康检查提醒",
          B:"公司有4个放射人员健康检查过期",
          C: "待处置",
          D:"2024-08-12 12:00:00",
          E:"1"
        },

      ],
      // 查询参数
      queryParams: {
        pageNum:  1,
        pageSize: 10
      },
      // 表单参数
    };
  },
  /*props: {
    editVisible: {
      type: Boolean,
      default: () => {
        return false
      }
    }
  },
  watch:{

  },
  computed: {
    show: {
      get () {
        return this.editVisible
      },
      set (val) {
        this.$emit('update:editVisible', val)
      }
    },
  },*/
  methods :{
    handleInfo(row) {

     //  alert("待做")
    },
   async getList(){
    this.loading = true;
    let res =  await dev()
    this.infoList = res.rows
    this.total = res.total
    console.log(res,'report');
    
      this.loading = false;
    },
    handleSizeChange(val){
      this.getList();
    },  
    handleSelectionChange(val){

    },
    handleCurrentChange(val){

    }

  },
  mounted() {
    this.getList();
  },

}
</script>

<style>

</style>
